Propensity Score Specifications:
$covs_nr treat ~ bwg + hispanic + black + b.marr + lths + hs + ltcoll + work.dur + prenatal + sex + first + bw + income + preterm + momage + dayskidh
$covs_nr_st treat ~ bwg + hispanic + black + b.marr + lths + hs + ltcoll + work.dur + prenatal + sex + first + bw + income + preterm + momage + dayskidh + st5 + st9 + st12 + st25 + st36 + st42 + st53
$covsi21 treat ~ bw + preterm + dayskidh + sex + hispanic + b.marr + lths + hs + ltcoll + work.dur + prenatal + momage + income + bwT + pretermT + income + black:dayskidT + b.marr:bw + b.marr:preterm + b.marr:dayskidT + bw:income
$covsi21_st treat ~ bw + preterm + dayskidh + sex + hispanic + b.marr + lths + hs + ltcoll + work.dur + prenatal + momage + income + bwT + pretermT + st5 + st9 + st12 + st25 + st36 + st42 + st53 + black:dayskidT + bw:b.marr + preterm:b.marr + b.marr:dayskidT + bw:income
---
title: "IHDP"
output:
flexdashboard::flex_dashboard:
theme: lumen
source_code: embed
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo=FALSE)
knitr::opts_chunk$set(include=TRUE)
knitr::opts_chunk$set(message=FALSE)
knitr::opts_chunk$set(warning=FALSE)
knitr::opts_chunk$set(tidy.opts=list(width.cutoff=80), tidy=TRUE)
knitr::opts_knit$set(root.dir='..')
```
```{r library, include=FALSE}
library(flexdashboard)
library(tidyverse)
library(plotly)
library(kableExtra)
library(cobalt)
library(rstanarm)
options(mc.cores=parallel::detectCores()-1)
library(survey)
library(here)
source(here('library/library.r'))
source(here('library/matching.R'))
source(here('library/balance.R'))
source(here('library/estimation.R'))
```
```{r plotting, include=FALSE}
theme_set(theme_minimal())
# treat
treat_vals <- c(`0`='slategray', `1`='red3')
treat_labs <- c(`0`='Control', `1`='Treated')
treat_col <- scale_color_manual('', values=treat_vals, labels=treat_labs)
treat_fill <- scale_fill_manual('', values=treat_vals, labels=treat_labs)
# matching
match_vals <- c('mwor'='dodgerblue', 'mwr'='seagreen')
match_col <- scale_color_manual('', values=match_vals)
```
```{r data, include=FALSE}
ihdp <- readRDS(here('data/ihdp.rds'))
```
Covariates
=======================================================================
```{r, child='covs.rmd'}
```
Propensity Score
=======================================================================
```{r, child='psfit.rmd'}
```
Balance
=======================================================================
```{r, child='balance.rmd'}
```
Treatment Estimation
=======================================================================
```{r, child='est.rmd'}
```